#include <iostream>
#define PI 3.1415926
using namespace std;
class Base{
    public:virtual double area()=0;
};
class Triangle:public Base{
    private:
        int height;
        int l;
    public:
        Triangle(int h,int l):height(h),l(l){}
        virtual double area(){return height*l*1/2.0;}
};
class Circle:public Base{
    private:
        int radius;
    public:
        Circle(int r):radius(r){}
        virtual double area(){return PI*radius*radius;}
};
int main(){
    Base *b;
    b=new Triangle(5,3);
    cout<<"TriangleArea="<<b->area()<<endl;
    delete b;
    b=new Circle(2);
    cout<<"CircleArea="<<b->area()<<endl;
    delete b;
    return 0;
}